import React, { Component, PropTypes } from 'react';
import { Table, Row, Col, Spin } from 'antd';
import moment from 'moment';
import FeaturesReport from './FeaturesReport';
import ClosedPositionList from './ClosedPositionList';
import Education from './Education';
import AccountAssets from './AccountAssets';
import AnalysisReport from './AnalysisReport';

class RetailDetail extends Component {
  static propTypes = {
    data: PropTypes.object,
  }
  static defaultProps = {
  }
  componentDidMount() {
    this.getData(this.props);
  }
  componentWillReceiveProps(nextProps) {
    if (nextProps !== this.props && nextProps.data!=this.props.data) {
      this.getData(nextProps);
    }
  }
  getData(props) {

  }
  render() {
    const { features,featuresMapping } = this.props;
    return (
        <div className="report-detail">
          
          <div className="report-title" style={{marginTop:10}}>特征分析</div>
          <FeaturesReport features={features} featuresMapping={featuresMapping} />

          <div className="report-title">分析报告</div>
          <AnalysisReport />

          <div className="report-title">推荐阅读</div>
          <Education />

          <div className="report-title">持仓资产</div>
          <AccountAssets />

          <div className="report-title" style={{marginBottom:20}}>平仓头寸</div>
          <ClosedPositionList />
        </div>
    );
  }
}

export default RetailDetail;
